Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id MAA04170; for <mcox@access.digex.net> ; Sat, 16 Dec 1995 12:05:46 -0500
Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id JAA03689 for amos-out; Sat, 16 Dec 1995 09:22:33 -0500
Received: from mail1.access.digex.net (mail1.access.digex.net [205.197.247.2]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id JAA03686 for <amos-list@svcs1.digex.net>; Sat, 16 Dec 1995 09:22:31 -0500
Received: from agora.stm.it (agora.stm.it [194.20.43.1]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id JAA23990; for <amos-list@access.digex.net> ; Sat, 16 Dec 1995 09:22:19 -0500
From: M.Berionne@agora.stm.it
Received: (from root@localhost) by agora.stm.it (8.6.8.1/8.6.6) id PAA20558; Sat, 16 Dec 1995 15:23:20 GMT
Message-Id: <199512161523.PAA20558@agora.stm.it>
To: amos-list@access.digex.net
Subject: Image processing
Date: Sat, 16 Dec 95 15:20:5 GMT
Status: RO
X-Status:
Hello guy,
> However I don't know how to separate and pull a 0 to 16 value from
> the "F" and the "G" and the "3" of the "FG3" string. This is not the
> sort of programming at which I am good. I just need the line of code
> to get these 3 values, average them, set a minimum threshold to kill
> the pixel to zero, and then I'll run the procedure about 1,200,000
> times to process each pixel in my 70 frame animation.
Well, to be honest: DO YOU KNOW ANYTHING ABOUT HEX NUMBER???
You ask about a possible "FG3" string that should be the colour of a point.
But the hex numbers go FROM 0 (zero) up TO F and F means 15. So, you have:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12 and so on.
But 11 will NOT mean eleven, but it stands for the normal 17. Is it clear??
Now, the Point(,) function does not return a string, but a number. You can
display it such as a string, using the hex$() function, but it still remain
a
number.
It's better to display it in hex, since in this way you can "think" that
each
part of the number is a component of the colour. $4F6 means that the RED
level is 4, the GREEN one is F (=15) and the BLU one is 6: this is why it's
called RGB.
Now, to know the value of each component, you can do:
R=Point(x,y)/256
G=(Point(x,y)/16)-(R*16)
B=Point(x,y)-(R*256)-(G*16)
Is it clear??
But if you own Craft extension look for a special command about all it.